/*
 * To change this template, choose Tools | Templates
 *
 *  17, November, 2011 Class Created
 *
 * and open the template in the editor.
 */

package portfolio.dbHost.dataBases.dbTable;

import portfolio.dbHost.Host;
import portfolio.dbHost.dataBases.DBase;

/**
 *
 * @author aca ldero
 */
public class TableFactory {

    public Table getDBType (DBase DBaseParam) throws Exception
    {
        if (DBaseParam.getDBHost().getDBType() == Host.DB_TYPE_MYSQL) {
            return new MysqlTable (DBaseParam);
        } else if (DBaseParam.getDBHost().getDBType() == Host.DB_TYPE_ODBC) {
            return new OdbcTable (DBaseParam);
        } else {
            throw new Exception ("DB type unknown while trying to create Column.");
        }
    }
}
